<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title>${title}</title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<#include "common/am.reference.ftl" />
	</head>
	<body class="${configs["skinName"]}">
		<div class="page-content">
			<div class="row">
			<#if viewMode !="view">
			<#include "common/breadcrumb.ftl">
			</#if>
				<form id="form" role="form" class="form-horizontal" method="post" action="${base}/${form_action}">
					<div class="col-xs-12">
						<div class="widget-box">
							<div class="widget-body">
								<input type="hidden" name="id" id="id" value="${model.id}" <#if viewMode == "view">disabled</#if>>
								<#if viewMode == "view">
								<div class="widget-header widget-header-flat">
									<h5 class="lighter">
										${module}
									</h5>
								</div>
								<#else>
								<div class="alert alert-warning">
									<strong>提示!</strong>
									<strong style="color:#dd514c;">出现红框</strong>的表示不能为空
								</div>
								</#if>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        等级
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="level" name="level" value="${model.level}" class="form-control" required placeholder="请输入等级，如 1">
                                        <span class="lbl"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        等级名称
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="name" name="name" value="${model.name}" class="form-control" required placeholder="请输入等级名称">
                                        <span class="lbl"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        一级分销占比
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="number" id="rate1" name="rate1" value="${model.rate1}" class="form-control" required placeholder="请输入一级分销占比（百分比转化为小数点，如0.01）">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        二级分销占比
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="number" id="rate2" name="rate2" value="${model.rate2}" class="form-control" required placeholder="请输入二级分销占比（百分比转化为小数点，如0.01）">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        是否启用
                                    </label>
                                    <div class="col-sm-6">
                                        <input class="ace ace-switch ace-switch-7" type="checkbox" name="enabled" <#if model == null || model.enabled>checked="checked"</#if> <#if viewMode == "view">disabled</#if>>
                                        <span class="lbl"></span>
                                    </div>
                                </div>
								<#if viewMode != "view">
								<div class="clearfix form-actions">
									<div class="col-md-offset-3 col-md-9">
										<button id="btnSubmit" class="btn btn-info" type="submit">
											<i class="fa fa-check bigger-110"></i>
											提 交
										</button>
									</div>
								</div>
								</#if>
							</div>
						</div>
					</div>
				</form>
			</div>	
		</div>
		<script type="text/javascript">
		$(function(){
		    $('#Address').chosen();
            $('#Address').change(function(){
                var address = $(this).val();
                var operationArea = $(this).find('option[value="'+address+'"]').text();
                $('input[name="operationArea"]').val(operationArea);
            });
            $('#operationArea').trigger('change');

			$('.select-chosen').chosen();
			$('#form').validator();
		})
		</script>
	</body>
</html>